package com.wjh.user.request;

import java.io.Serial;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 保存用户信息 请求参数
 * 
 * @author wenjianhai
 * @date 2023/6/21
 * @since JDK 17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
public class SaveUserRequest implements Serializable {
	@Serial
	private static final long serialVersionUID = 743431874098209300L;

	/** 主键id（新增时为空，修改时不为空） */
	@Schema(description = "主键id（新增时为空，修改时不为空）")
	private Long id;

	/** 登录名 */
	@Schema(description = "登录名", requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "登录名不能为空")
	private String loginName;

	/** 用户名 */
	@Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "用户名不能为空")
	private String userName;

	/** 密码 */
	@NotBlank(message = "密码不能为空")
	@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
	private String passwords;
}
